import Vue from "vue";
import VueI18n from "vue-i18n";
import enLocale from "element-ui/lib/locale/lang/en";
import zhLocale from "element-ui/lib/locale/lang/zh-CN";
import jsCookie from "js-cookie";
import zh from "./zh";
import en from "./en";
if (!jsCookie.get("lang")) {
  jsCookie.set("lang", "en");
}
Vue.use(VueI18n);
const i18n = new VueI18n({
  locale: jsCookie.get("lang") || "en",
  messages: {
    en: {
      he: "hello",
      ...enLocale,
      ...en,
    },
    zh: {
      he: "你好",
      ...zhLocale,
      ...zh,
    },
  },
});
export default i18n;
